home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Tools 5
/
Amiga Tools 5.iso
/
tools
/
wb-tools
/
extrainfo
/
extrainfo.install
< prev
next >
Wrap
Text File
|
1995-07-19
|
10KB
|
434 lines
; *************************************************************************
; ******************** EXTRAINFO INSTALLATION SCRIPT ********************
; *************************************************************************
;
; $VER: ExtraInfo.install 1.2 (19.7.95)
;
; Copyright ©1995 Nick Christie
;
; *************************************************************************
;
; Find out about program version, etc
; get version of EI in distribution
(set vernum-ei (getversion "ExtraInfo"))
(set ver-ei (/ vernum-ei 65536))
(set rev-ei (- vernum-ei (* ver-ei 65536) ) )
(set @default-dest "")
(set defeidir "SYS:")
(set defewbidir "SYS:WBStartup")
(set catsdir "Locale:Catalogs")
(set catfile "ExtraInfo.catalog")
(set libsdir "Libs:")
; if novice user-level, bump up to average
(if (= 0 @user-level)
(
(set @user-level 1)
(user 1)
)
)
(set old-user-level @user-level)
; ************************************************************************
; English strings
; ************************************************************************
(set default_lang 1)
(set #yes-msg "Yes")
(set #no-msg "No")
(set #bad-kick-msg "ExtraInfo requires AmigaOS 2.04 or better!")
(set #hello-msg
(cat
("Welcome to ExtraInfo V%ld.%ld\n\n" ver-ei rev-ei)
"This script will install ExtraInfo and "
"related files on your Amiga.\n\n"
"You will need to answer a few questions such as "
"where you would like the program installed.\n\n"
"If you do not wish to install ExtraInfo at this time, "
"select the 'Abort Install' button now. "
)
)
(set #ei-askdir-msg "Select the directory to install ExtraInfo in.")
(set #ei-askicon-msg "Please select your preferred icon style:\n")
(set #bgui-askdir-msg
(cat
"Select the directory to install bgui.library in. "
"(Will *not* overwrite an existing newer version.)"
)
)
(set #eiai-ask-msg "\nDo you wish to install the standard AppIcon?")
(set #eiai-ask-help
(cat
"If you select 'Yes' the standard AppIcon will be installed "
"in a directory of your choice. Select 'No' if you do not wish "
"to use the AppIcon facility, or if you will be providing your "
"own AppIcon image."
)
)
(set #eiai-askdir-msg "Select the directory to install the AppIcon in.")
(set #eiguide "ExtraInfo.guide")
(set #eiguide-ask-msg
(cat
"\nInstall ExtraInfo documentation?\n\n"
"(This is an AmigaGuide file, and you will be asked "
"for the directory in which to install it.)\n\n"
"I recommend installing this, and reading it too, "
"so that you know how to utilitise ExtraInfo to "
"its fullest. "
)
)
(set #eiguide-askdir-msg
"Select the directory to install ExtraInfo.guide in."
)
(set #guide-help
(cat
"AmigaGuide is the Amiga's standard hypertext format.\n\n"
"If you have AmigaOS 3.0 or better, you can use MultiView "
"to read this documentation, otherwise you must use the AmigaGuide "
"program, which is available on AmiNet and Fred Fish disk #870.\n\n"
"Both of these viewer programs have a 'search path', a set "
"of directories they search for AmigaGuide documents. "
"You should place this guide somewhere in that path."
)
)
(set #ewbi-ask-msg
(cat
"Would you like to install ExtraWBInfo?\n\n"
"This program redirects the Workbench Icon Information "
"menu item so that it calls up ExtraInfo instead of "
"Workbench's own Information requester."
)
)
(set #ewbi-help
(cat
"Install ExtraWBInfo if you would like to replace Workbench's "
"own Information window with that of ExtraInfo.\n\n"
"ExtraWBInfo is normally placed in the WBStartUp drawer so "
"that it starts up every time you boot your Amiga. It does "
"not have (or need) a window of its own, but you can turn "
"it on and off using the Commodities Exchange program."
)
)
(set #ewbi-askdir-msg
"Select the directory to install ExtraWBInfo in."
)
(set #ewbiguide "ExtraWBInfo.guide")
(set #ewbiguide-ask-msg
(cat
"\nInstall ExtraWBInfo documentation?\n\n"
"(This is an AmigaGuide file, and you will be asked "
"for the directory in which to install it.)"
)
)
(set #ewbiguide-askdir-msg
"Select the directory to install ExtraWBInfo.guide in."
)
(set #locale-msg
(cat
"\ExtraInfo is localized and has been translated "
"into the following languages. Please indicate "
"which translations you wish to install.\n"
)
)
(set #locale-help
(cat
"These are the languages supported by ExtraInfo.\n\n"
"Simply specify the languages you prefer and the "
"required catalog files will be copied to the "
"Locale:Catalogs directory.\n\n"
"Note that the English language is built-in and "
"does not require a catalog file."
)
)
; ************************************************************************
; xxxx strings - template for other languages
; ************************************************************************
(if (= @language "xxxx")
(
(set default_lang ?)
) ; endif xxxx language
)
; ************************************************************************
; Begin actual installation
; ************************************************************************
; Check for KickV37 or better
(if (< (/ (getversion) 65536) 37)
(
(abort #bad-kick-msg)
)
)
; ------------------------------------------------------------------------
; Show welcome msg
(user 2)
(message #hello-msg)
(user old-user-level)
; ------------------------------------------------------------------------
; Ask the user where we should install ExtraInfo.
(set eidir
(askdir
(prompt #ei-askdir-msg)
(help @askdir-help)
(default defeidir)
)
)
(set @default-dest eidir)
; ------------------------------------------------------------------------
; Ask the user which icon style (if any) s/he would prefer.
(set iconstyle
(askchoice
(prompt #ei-askicon-msg)
(help @askchoice-help)
(choices "MagicWB (8 colour)" "Standard (4 colour)" "Neither")
(default 0)
)
)
; ------------------------------------------------------------------------
; Install ExtraInfo, along with the desired icon.
(copyfiles (source "ExtraInfo") (dest eidir) )
(if (= 0 iconstyle)
(copyfiles (source "ExtraInfo.info") (dest eidir) )
)
(if (= 1 iconstyle)
(copyfiles
(source (tackon "4ColourIcons" "ExtraInfo.info"))
(dest eidir)
)
)
; ------------------------------------------------------------------------
; Install BGUI library. If expert, ask for directory.
(if (= 2 @user-level)
(set libsdir
(askdir
(prompt #bgui-askdir-msg)
(help @askdir-help)
(default libsdir)
)
)
)
(copylib (source "Libs/bgui.library") (dest libsdir)
)
; ------------------------------------------------------------------------
; Install ExtraInfo.appicon. Ask yes/no first, then ask for directory.
(set aidir eidir)
(if (askbool
(prompt #eiai-ask-msg)
(help #eiai-ask-help)
(default 1)
(choices #yes-msg #no-msg)
)
; then
(
(set aidir
(askdir
(prompt #eiai-askdir-msg)
(help @askdir-help)
(default aidir)
)
)
(if (= 1 iconstyle)
(copyfiles
(source (tackon "4ColourIcons" "ExtraInfo.appicon.info"))
(dest aidir)
)
(copyfiles (source "ExtraInfo.appicon.info") (dest aidir) )
)
(tooltype
(dest (tackon eidir "ExtraInfo"))
(settooltype "APPICONNAME" (tackon aidir "ExtraInfo.appicon"))
)
)
)
; ------------------------------------------------------------------------
; Install ExtraInfo.guide. Ask yes/no first, then ask for directory.
(set guidedir eidir)
(if (askbool
(prompt #eiguide-ask-msg)
(help #guide-help)
(default 1)
(choices #yes-msg #no-msg)
)
; then
(
(set guidedir
(askdir
(prompt #eiguide-askdir-msg)
(help @askdir-help)
(default guidedir)
)
)
(copyfiles (source #eiguide) (dest guidedir) (infos) )
)
)
; ------------------------------------------------------------------------
; Install ExtraWBInfo if V38+. Ask yes/no first, then ask for directory.
(if (> (/ (getversion) 65536) 37)
(
(set ewbidir defewbidir)
(if (askbool
(prompt #ewbi-ask-msg)
(help #ewbi-help)
(default 1)
(choices #yes-msg #no-msg)
)
; then
(
(set ewbidir
(askdir
(prompt #ewbi-askdir-msg)
(help @askdir-help)
(default defewbidir)
)
)
(copyfiles (source "ExtraWBInfo") (dest ewbidir))
(if (= 0 iconstyle)
(copyfiles (source "ExtraWBInfo.info") (dest eidir) )
)
(if (= 1 iconstyle)
(copyfiles
(source (tackon "4ColourIcons" "ExtraWBInfo.info"))
(dest eidir)
)
)
(tooltype
(dest (tackon ewbidir "ExtraWBInfo"))
(settooltype "EXTRAINFOCMD" (tackon eidir "ExtraInfo"))
)
(set ewbiguidedir ewbidir)
(if (askbool
(prompt #ewbiguide-ask-msg)
(help #guide-help)
(default 1)
(choices #yes-msg #no-msg)
)
; then
(
(set ewbiguidedir
(askdir
(prompt #ewbiguide-askdir-msg)
(help @askdir-help)
(default ewbiguidedir)
)
)
(copyfiles (source #ewbiguide) (dest ewbiguidedir) (infos) )
)
)
)
)
)
)
; ------------------------------------------------------------------------
; Install catalog file(s)
(if (exists "libs:locale.library")
(
(if (exists catsdir)
(
(set lang
(askoptions
(prompt #locale-msg)
(help #locale-help)
(choices
"English"
"Deutsch"
"Italiano"
)
(default default_lang)
)
)
(set n 0)
(while
(set language
(select n
"English"
"Deutsch"
"Italiano"
""
)
)
(
(if (in lang n)
(
(if (<> 0 n)
(
(makedir (cat catsdir "/" language))
(copyfiles
(source (cat "Catalogs/" language "/" catfile))
(dest (cat catsdir "/" language))
)
)
)
)
)
(set n (+ n 1))
)
) ; endwhile pick language n
) ; endthen
) ; endif exists catsdir
) ; endthen
) ; endif exists locale lib